package designpattern.factory;

public class SimpleFactory {
    public Milk getMike(String name){
        if("特仑苏".equals(name)){
            return new TelusuMike();
        }else if("蒙牛".equals(name)){
            return new MengniuMilk();
        }else if("三鹿".equals(name)){
            return new SanluMilk();
        }else {
            return null;
        }
    }
}
